(ok, value) = tui.enter_range('Enter the best aligned value for line %s (1-%d): ' % (letter, maximum), 1, maximum)
if not ok:
sys.exit(0)
return (ok, value)
def enterPaperEdge(maximum):
(ok, value) = tui.enter_range('Enter numbered arrow that is best aligned with the paper edge (1-%d): ' % maximum, 1, maximum)
if not ok:
sys.exit(0)
return (ok, value)
def colorAdj(line, maximum):
(ok, value) = tui.enter_range('Enter the numbered box on line %s that is best color matched to the background color (1-%d): ' % (line, maximum), 1, maximum)
if not ok:
sys.exit(0)
return (ok, value)
def bothPensRequired():
log.error('Cannot perform alignment with 0 or 1 cartridges installed.\nPlease install both cartridges and try again.')
def invalidPen():
log.error('Invalid cartridge(s) installed.\nPlease install valid cartridges and try again.')
def invalidPen2():
log.error('Invalid cartridge(s) installed. Cannot align with only the photo cartridge installed.\nPlease install other cartridges and try again.')
def aioUI1():
log.info('To perform alignment, you will need the alignment page that is automatically\nprinted after you install a print cartridge.')
log.info('\np\t\tPrint the alignment page and continue.')
log.info('n\t\tDo Not print the alignment page (you already have one) and continue.')
(ok, value) = tui.enter_range('Enter the numbered box on line %s where the inner lines best line up with the outer lines (1-%d): ' % (line, controls[line][1]), 1, controls[line][1])
values.append(value)
if not ok:
sys.exit(0)
continue
return values
def aioUI2():
log.info('')
log.info(log.bold('Follow these steps to complete the alignment:'))
log.info('1. Place the alignment page, with the printed side facing down, ')
log.info(' in the scanner.')
log.info('2. Press the Enter or Scan button on the printer.')
log.info('3. "Alignment Complete" will be displayed when the process is finished (on some models).')
try:
mod = module.Module(__mod__, __title__, __version__, __doc__, None, (INTERACTIVE_MODE, GUI_MODE), (UI_TOOLKIT_QT4,))